![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@zcorky/storage
Advanced tools
A minimal API wrapper for localStorages, inspired by tsironis/lockr and marcuswestin/store.js. It is written fully with Typescript.
store
API & patterns$ npm install @zcorky/storage
import storage from '@zcorky/storage';
// set sets the value of the given key
// suport maxAge, unit: ms
storage.set('user', { name:'Marcus' }, 30 * 1000)
// get returns the value of the given key
storage.get('user')
// remove removes the value of the given key
storage.remove('user')
// clear clears the storage
storage.clear()
// keys returns the keys of the storage
storage.keys()
// getAll returns the all items of the storage
storage.getAll()
// has checks whether the given key exists
storage.has('user')
// built-in drivers
// local - use localStorage
// session - use sessionStorage
// indexeddb - use IndexedDB
// service - use service with http request
storage.setDriver('session')
// custom prefix
storage.setPrefix('my-prefix-')
Default storage is a global storage with singleton pattern.
If you want to create a new storage, you can use storage.create()
method.
const storage = storage.create(options);
import { StorageDriver } from '@zcorky/storage';
// 1. Create a class implements StorageDriver
export class CustomStorage extends StorageDriver {
...
}
// 2. Register the driver
storage.setDriver('custom', CustomStorage)
MIT © Moeover
FAQs
A minimal API wrapper for localStorage
We found that @zcorky/storage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.